import http from "@/api";

// return http.post<Login.ResLogin>(PORT1 + `/login`, params, { loading: false }); // 控制当前请求不显示 loading
// return http.post<Login.ResLogin>(PORT1 + `/login`, {}, { params }); // post 请求携带 query 参数  ==>  ?username=admin&password=123456
// return http.post<Login.ResLogin>(PORT1 + `/login`, qs.stringify(params)); // post 请求携带表单参数  ==>  application/x-www-form-urlencoded
// return http.get<Login.ResLogin>(PORT1 + `/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // get 请求可以携带数组等复杂参数

// 获取我的客户列表
export const getMyCustomerList = params => {
  //   return http.get("/customer/list", params);
  return {
    data: {
      list: [
        {
          username: "张三",
          level: "A",
          businessType: "贷款",
          dateOfCollection: "2022-01-01",
          contactInformation: "12345678901",
          latestFollowTime: "2022-01-01",
          latestFollowContent: "这是最新跟进内容"
        }
      ]
    }
  };
};

// 今日领取限制
export const getTodayClaimRestrictions = params => {
  return http.get("/customer/claimRestrictions", params);
};

// 获取筛选模版列表
export const getFilteringTemplateList = params => {
  return http.get("/customer/filter/template", params);
};

// 删除筛选模版
export const delFilteringTemplate = params => {
  return http.delete("/customer/filter/template", params);
};

// 客户详情
export const getCustomerDetailsData = params => {
  return http.get("/customer/detail", params);
};
